<template>
  <div class="detaile">
    <h1>详情页</h1>
  </div>
</template>

<script>
export default {
  name: 'detaile',
  props: ['id'],
  data() {
    return {
      title: '详情页'
    }
  },
  mounted() {
    //两种获取传参的方法
    // console.log(this.$route.params.id)
    // console.log(this.id)
    if(this.$route.params.id) {
      console.log('id='+this.$route.params.id)
    }else {
      console.log('未获取到参数')
    }
  }
}
</script>